草庐IT

ionic 卡片

全部标签

android - ionic registerBackButtonAction 不起作用

重现步骤如下:创建一个基本的ionic项目ionicstarttestsidemenu添加android平台ionic平台添加android在app.js中添加代码:$ionicPlatform.registerBackButtonAction(function(event){alert("backbuttonactionhandler");event.preventDefault();},999);此代码可以添加到.run方法或$ionicPlatform.ready()方法中-结果相同,但不起作用ionicbuildandroid然后ionicupload->或手动将APK放到设备

android - 如何自定义卡片 View ?

如何以这种方式(左上角)自定义卡片View?以我的方式,如果我添加3个彩色框(蓝色、灰色、白色),我总是会在卡片View框的周边得到一个细边框。有什么例子吗?谢谢。 最佳答案 你试过相对布局吗?android:orientation="horizontal"> 关于android-如何自定义卡片View?,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/30797411/

android - 构建错误-Ionic Cordova 对 android 失败

这个问题在这里已经有了答案:Running"cordovabuildandroid"-unabletofindattributeandroid:fontVariationSettingsandandroid:ttcIndex(26个答案)关闭4年前。运行命令“ioniccordovabuildandroid--stacktrace”时出现以下错误::generateDebugResources:mergeDebugResources:processDebugManifest:processDebugResourcesERROR:InFontFamilyFont,unabletofind

android - 设置 Ionic 应用程序时出错

我刚刚开始使用IonicFramework编写我的第一个Android应用程序。我可以设置项目,但是当我想通过“ionicplatformadd”添加Android平台时,它说:'?Errorreadingconfigfile:Error:ENOENT,open'D:\Projects\android2\config.xml'Errorhappened:undefined'当我想通过“ionicbuildandroid”构建应用程序时,它说:“当前工作目录不是基于Cordova的项目。”当我从ionicFAQ('cordovacreate')运行修复程序时,它说:'Atleastthe

android - 如何显示下一张/上一张卡片的一部分 RecyclerView

实现此功能的最佳策略是什么:我有一个带有卡片的水平RecyclerView。每张卡片都将填满整个屏幕,但我希望它显示下一张卡片的一部分和上一张卡片(如果它有多个项目)。我知道我可以通过在适配器上设置我的卡android:layout_width来实现这一点,使其具有特定的DP,例如250dp而不是match_parent。但它看起来不像是一个合适的解决方案。这是我的代码:带有RecyclerView的Activity:classListPokemon:AppCompatActivity(){overridefunonCreate(savedInstanceState:Bundle?){

android - Ionic Android 构建失败 : Unable to start the daemon process

当我运行ionicbuildandroid--release我得到一个错误ErroroccurredduringinitializationofVMCouldnotreserveenoughspacefor2097152KBobjectheap有人知道怎么解决吗? 最佳答案 我通过添加一个新的系统变量name:_JAVA_OPTIONS和value:-Xmx512M得到了解决方案 关于android-IonicAndroid构建失败:Unabletostartthedaemonproce

android - Ionic 3 Android 应用程序的状态栏文本颜色为深色或黑色

我需要将状态栏文本颜色更改为深色(或黑色)。但是itisnotsupportedonCordovaplugin.但是我看到在Android原生设备上有一个方法,如下所示。我们也可以在Ionic3应用程序上做同样的事情吗?Refernce:@color/status_bar_colorfalse 最佳答案 你可以试试这个statusBar.overlaysWebView(true);statusBar.backgroundColorByHexString('#1f2933'); 关于and

javascript - DocumentViewer 不适用于 Ionic 3

我尝试使用ionic/cordovapluginhere.所以我将这段代码放在我的页面中:showDocument(){varoptions:DocumentViewerOptions={title:'Abook',documentView:{closeLabel:''},navigationView:{closeLabel:''},email:{enabled:true},print:{enabled:true},openWith:{enabled:true},bookmarks:{enabled:true},search:{enabled:false},autoClose:{onP

android - 无法在 Genymotion Android 模拟器中运行 ionic 2 应用程序

我的ionic2应用程序无法在GenymotionAndroid模拟器中运行。错误信息是:ERRORrunningoneormoreoftheplatforms:Error:adb:Commandfailedwithexitcode1Erroroutput:error:couldnotinstallsmartsocketlistener:AddressalreadyinuseADBserverdidn'tACK*failedtostartdaemon*error:cannotconnecttodaemonYoumaynothavetherequiredenvironmentorOSto

android - 文件 google-services.json 丢失。没有 ionic 3,Google 服务插件将无法运行

我正在使用FCM推送通知我总是收到此错误消息"Filegoogle-services.jsonismissing.TheGoogleServicesPlugincannotfunctionwithoutitionic3"在手机上,我将我的google-services.json放在每个文件夹上,但没有任何工作 最佳答案 首先需要下载google-services.json:登录Firebase并打开您的项目。点击设置图标并选择项目设置。在“您的应用”卡片中,从列表中选择您需要其配置文件的应用程序包名称。点击google-servic